package com.zheng.wc.rpc.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.zheng.common.annotation.BaseService;

import com.zheng.wc.dao.mapper.WcNoticeMapper;
import com.zheng.wc.dao.model.WcNotice;
import com.zheng.wc.dao.model.WcNoticeUser;
import com.zheng.wc.dao.mapper.WcNoticeUserMapper;
import com.zheng.wc.rpc.api.WcNoticeUserService;
import com.zheng.common.base.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author likun
 * @since 2018-04-23
 */
@Service
@Transactional(rollbackFor = Exception.class)
@BaseService
public class WcNoticeUserServiceImpl extends BaseServiceImpl<WcNoticeUserMapper, WcNoticeUser> implements WcNoticeUserService {
    @Autowired
    private WcNoticeUserMapper noticeUserMapper;

    public List<Map<String, Object>> selectUserNoticePages(WcNotice notice, Integer userId) {
        return noticeUserMapper.selectUserNoticePages(notice, userId);
    }

    public Integer selectUserNoticePagesCount(WcNotice notice, Integer userId) {
        return noticeUserMapper.selectUserNoticePagesCount(notice, userId);
    }

    public Map<String, Object> selectUserNotice(Integer id) {
        return noticeUserMapper.selectUserNotice(id);
    }
}
